Skip to content

Android: Fix not clickable via TalkBack - #1190

Merged
Naturalclar merged 1 commit into
react-native-menu:masterfrom
terreng:terreng-patch-1
Nov 22, 2026
Merged

Naturalclar merged 1 commit into
react-native-menu:masterfrom
terreng:terreng-patch-1

Conversation

@terreng

@terreng terreng commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

Overview

Fixes #1189 by forwarding the child's click event to the parent menu.

The issue: The menu trigger isn't clickable via TalkBack (screen reader) on Android. You can select the menu button, but clicking it does nothing. It works fine without a screen reader, and on iOS with or without VoiceOver.

Test Plan

<MenuView
  actions={[{
    id: 'share',
    title: 'Share Action',
  }]}
>
  <Pressable>
    <Text>Open Menu</Text>
  </Pressable>
</MenuView>

Without the fix:

  • Tapping it works
  • Turn on TalkBack on Android, and observe that you can select the item, but clicking it does nothing

With the fix:

  • Tapping it works
  • Turn on TalkBack on Android, and observe that clicking it now works as expected

@terreng
terreng requested a review from Naturalclar as a code owner November 25, 2025 19:35
@coldsmirk

Copy link
Copy Markdown

Tested on 2.0.0 with RN 0.88 (New Architecture), Android 16 emulator: with this change, ACTION_CLICK on the trigger — what TalkBack's double tap sends — opens the menu.

One thing to watch on Fabric: our trigger View only had accessibilityLabel/accessibilityRole and got flattened away, so it never reached addView as the child. Adding accessible to it kept a single labelled node.

@Naturalclar Naturalclar reopened this Nov 22, 2026

@Naturalclar Naturalclar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Forwarding the child's accessibility click to the menu is a clean fix for #1189. Normal taps are unaffected (onInterceptTouchEvent still takes every touch, and nothing else calls performClick()), and long-press mode is respected. CI is green against current master.

Follow-ups worth tracking separately (not blocking): menus with shouldOpenOnLongPress are still unreachable via TalkBack's long-press action, and the child's listener can be replaced by React Native's own setFocusable if that prop changes after mount.

@Naturalclar
Naturalclar merged commit d90f746 into react-native-menu:master Nov 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android, Accessibility: Not clickable via TalkBack when child is a Pressable

3 participants